class ELogColorType:
    White = 37,
    Red = 31,
    Green = 32,
    Yellow = 33,
    Blue = 34,
    Pink = 35,
    Cyan = 36

class console:
    ERROR_PREFIX = '[error]:'
    WARN_PREFIX = '[warn]:'
    LOG_PREFIX = '[info]:'
    @staticmethod
    def error(info):
        print(f'\033[0;30;41m{console.ERROR_PREFIX}{info}\033[0m')

    @staticmethod
    def warn(info):
        print(f'\033[0;30;43m{console.WARN_PREFIX}{info}\033[0m')

    @staticmethod
    def log(info, color=ELogColorType.White):
        if (color == ELogColorType.White):
            print(f'{console.LOG_PREFIX}{info}')
        elif(color == ELogColorType.Red):
            print(f'\033[0;31;40m{console.LOG_PREFIX}{info}\033[0m')
        elif(color == ELogColorType.Green):
            print(f'\033[0;32;40m{console.LOG_PREFIX}{info}\033[0m')
        elif(color == ELogColorType.Yellow):
            print(f'\033[0;33;40m{console.LOG_PREFIX}{info}\033[0m')
        elif(color == ELogColorType.Blue):
            print(f'\033[0;34;40m{console.LOG_PREFIX}{info}\033[0m')
        elif(color == ELogColorType.Pink):
            print(f'\033[0;35;40m{console.LOG_PREFIX}{info}\033[0m')
        elif(color == ELogColorType.Cyan):
            print(f'\033[0;36;40m{console.LOG_PREFIX}{info}\033[0m')
        else:
            console.error('log color exist!')


# console.log("haha")
# console.log("haha", ELogColorType.Red)
# console.log('haha', ELogColorType.Green)
# console.log('haha', ELogColorType.Yellow)
# console.log('haha', ELogColorType.Blue)
# console.log('haha', ELogColorType.Pink)
# console.log('haha', ELogColorType.Cyan)
# console.error('error')
# console.warn('warn')
